-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
helm: optimise repository index loading #685
Conversation
726e050
to
3b8ec52
Compare
Failures are due to GitHub Packages being degraded and therefore not being able to pull the libgit2 image. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the degraded GitHub Packages, this looks good to me. Thanks @pjbgf 🙇
Putting this on hold until we have run it past some affected users. |
3b8ec52
to
8978157
Compare
Avoid validating (and thus loading) indexes if the checksum already exists in storage. In other words, if the YAML is identical to the Artifact in storage, the reconciliation should be a no-op, and therefore can short-circuit long/heavy operations. Co-authored-by: Hidde Beydals <hello@hidde.co> Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
8978157
to
3b8ec52
Compare
759a2ea
to
009504b
Compare
if in == nil { | ||
return false | ||
} | ||
return in.Checksum == checksum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if in == nil { | |
return false | |
} | |
return in.Checksum == checksum | |
return in != nil && in.Checksum == checksum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I do not use this for nil
checks is that when logic changes, there is a chance someone accidentally omits the in != nil
check, and introduces a panic.
Patch has been confirmed to reduce the memory usage compared to |
Avoid validating (and thus loading) indexes if the checksum already exists in storage.
In other words, if the YAML is identical to the Artifact in storage, the reconciliation should
be a no-op, and therefore can short-circuit long/heavy operations.